package com.base.service.impl;

import com.base.mapper.voipmapper.ReplacementHistoryMapper;
import com.base.po.replacement.ReplacementHistory;
import com.base.po.replacement.ReplacementHistoryExample;
import com.base.service.ReplacementHistoryService;
import com.base.utils.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Service("replacementHistoryService")
public class ReplacementHistoryServiceImpl implements ReplacementHistoryService {
	
	@Autowired
	private ReplacementHistoryMapper replacementHistoryMapper;


	@Override
	public int countByExample(ReplacementHistoryExample example) {
		return replacementHistoryMapper.countByExample(example);
	}

	@Override
	public int deleteByExample(ReplacementHistoryExample example) {
		return replacementHistoryMapper.deleteByExample(example);
	}

	@Override
	public int insert(ReplacementHistory record) {
		return replacementHistoryMapper.insert(record);
	}

	@Override
	public int insertSelective(ReplacementHistory record) {
		return replacementHistoryMapper.insertSelective(record);
	}

	@Override
	public List<ReplacementHistory> selectByExample(ReplacementHistoryExample example) {
		return replacementHistoryMapper.selectByExample(example);
	}

	@Override
	public List<ReplacementHistory> selectToday(String userid, String cardno, Date createtime) {
		return replacementHistoryMapper.selectToday(userid, cardno, createtime);
	}

	@Override
	public List<ReplacementHistory> selectByUserID(Page page, String userid) {
		return replacementHistoryMapper.selectByUserID(page, userid);
	}

//	@Override
//	public int updateByExampleSelective(ReplacementHistory record, ReplacementHistoryExample example) {
//		return replacementHistoryMapper.updateByExampleSelective(record, example);
//	}
//
//	@Override
//	public int updateByExample(ReplacementHistory record, ReplacementHistoryExample example) {
//		return replacementHistoryMapper.updateByExample(record, example);
//	}

	@Override
	public int countByUserID(String userid) {
		return replacementHistoryMapper.countByUserID(userid);
	}

	@Override
	public BigDecimal selectMoney(String userid, String cardno, Date begin, Date end) {
		return replacementHistoryMapper.selectMoney(userid, cardno, begin, end);
	}
}
